package io.mybatis.example.springboot.model;

import io.mybatis.provider.Entity;
import org.apache.ibatis.type.JdbcType;

import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * sys_user - 用户信息表
 *
 * @author mkj
 */
@Getter
@Setter
@Entity.Table("sys_user" remark = "用户信息表", autoResultMap = true)
public class SysUserDO {
  @Entity.Column(value = "user_id", id = true, remark = "用户ID", updatable = false, insertable = false)
  private Long userId;

  @Entity.Column(value = "dept_id", remark = "部门ID")
  private Long deptId;

  @Entity.Column(value = "user_name", remark = "用户账号")
  private String userName;

  @Entity.Column(value = "nick_name", remark = "用户昵称")
  private String nickName;

  @Entity.Column(value = "user_type", remark = "用户类型（00系统用户）")
  private String userType;

  @Entity.Column(value = "email", remark = "用户邮箱")
  private String email;

  @Entity.Column(value = "phone_number", remark = "手机号码")
  private String phoneNumber;

  @Entity.Column(value = "sex", remark = "用户性别（0男 1女 2未知）")
  private String sex;

  @Entity.Column(value = "avatar", remark = "头像地址")
  private String avatar;

  @Entity.Column(value = "password", remark = "密码")
  private String password;

  @Entity.Column(value = "status", remark = "帐号状态（0正常 1停用）")
  private String status;

  @Entity.Column(value = "del_flag", remark = "删除标志（0代表存在 2代表删除）")
  private String delFlag;

  @Entity.Column(value = "login_ip", remark = "最后登录IP")
  private String loginIp;

  @Entity.Column(value = "login_date", remark = "最后登录时间", jdbcType = JdbcType.TIMESTAMP)
  private Date loginDate;

  @Entity.Column(value = "create_by", remark = "创建者")
  private String createBy;

  @Entity.Column(value = "create_time", remark = "创建时间", jdbcType = JdbcType.TIMESTAMP)
  private Date createTime;

  @Entity.Column(value = "update_by", remark = "更新者")
  private String updateBy;

  @Entity.Column(value = "update_time", remark = "更新时间", jdbcType = JdbcType.TIMESTAMP)
  private Date updateTime;

  @Entity.Column(value = "remark", remark = "备注")
  private String remark;

}
